#include "stdafx.h"
#include "TestDatabaseBase.h"
#include "DatabaseBase.h"
#include "UEConnectionManager.h"

using namespace PDMS::PDMSDBIF;

CPPUNIT_TEST_SUITE_REGISTRATION( TestDatabaseBase );


TestDatabaseBase::TestDatabaseBase()
{
}


TestDatabaseBase::~TestDatabaseBase()
{
}

void TestDatabaseBase::TestDataSource()
{
	DatabaseBase base( GET_REGISTER( DatabaseElementFactory, Design_VersionOne ) );
	base.DataSource( _T("D:\\UELIB\\libd\\DesignDBTemplate.mdb") );
	UEConnectionPtr ptr = base.DataSource();

	CPPUNIT_ASSERT( ptr != NULL );
	UEConnectionManager::Instance().CloseAllConnection();
}